<template>

  <el-form ref="ruleFrom" :model="ruleFrom"  label-width="100px">
    <el-page-header content="详情页" @back="goBack" />
    <el-row style="margin-top: 30px">
      <!--基本输入框-->
      <el-col :span="5">
        <el-form-item label="采购编号" prop="name1">
          {{ruleFrom.procurementId}}
        </el-form-item>
      </el-col>
      <!--基本单选框-->
      <el-col :span="5">
        <el-form-item label="创建人：" prop="name2">
          {{ruleFrom.procurementName}}
        </el-form-item>
      </el-col>
      <!--基本多选框-->
      <el-col :span="8">
        <el-form-item label="创建日期" placeholder="" prop="subjectId">
          {{ruleFrom.procurementDate}}
        </el-form-item>
      </el-col>
    </el-row>
    <!--上传文件-->
    <el-row>
      <el-col :span="20">
        <el-form-item label="药品数据" prop="fileName">

        </el-form-item>
      </el-col>


    </el-row>
    <!--数据表格-->
    <el-row>
      <el-col :span="24">
        <el-form-item>
          <el-table
              :data="ruleFrom.lyhProcurementDetailsEntities"
              border
              style="width: 100%">
            <el-table-column
                prop="drugEntity.drugName"
                label="药品名"
                width="180">
            </el-table-column>
            <el-table-column
                prop="numbers"
                label="药品数量">
            </el-table-column>

            <el-table-column
                prop="drugEntity.lyhSupplierEntity.supplierName"
                label="供应商">
            </el-table-column>
            <el-table-column
                prop="drugEntity.drugDate"
                label="生产日期">
            </el-table-column>

            <el-table-column
                prop="drugEntity.drugPrice"
                label="单价/元">
            </el-table-column>

            <el-table-column
                prop="drugEntity.drugPrice"
                label="总价格/元">
              <template #default="scope">

                {{scope.row.numbers * scope.row.drugEntity.drugPrice}}


              </template>



            </el-table-column>
            <el-table-column
                prop="procurementId"
                label="采购编号">
            </el-table-column>

          </el-table>
        </el-form-item>
      </el-col>
    </el-row>

  </el-form>

</template>

<script>
import http, {service} from "@/http/request";

export default {
  name: "putlnTest",
  data() {
    return {
      ruleFrom:{

        procurementName:"",
        procurementId:"",
        procurementFirstdate: '',
        procurementDate:""
      }
    }
  },
  methods:{
    // 跳转返回指定的页面
    goBack() {
      this.$router.push({
        path: '/putlnStorage'
      })
    },
  },
  created() {
    this.ruleFrom=JSON.parse(this.$route.query.value);
    console.log(this.ruleFrom)

  }
}
</script>

<style scoped>

</style>
